<?php $this->context->layout = 'fullout'; ?>
<div class="ui-layout-center">
    <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="role-form">
                    <input type="hidden" name="structId" id="structId" value="">
                    <div class="select-list">
                        <ul>
                            <li><?= \common\widgets\FormInput::widget(['name'=>'input|标题','extend'=>['name'=>'like[title]']])?></li>
                            <li><?= \common\widgets\FormInput::widget(['name'=>'select|状态','extend'=>['name'=>'where[status]','value'=>'','place'=>'所有']])?></li>
                            <li>
                                <?= $this->render('/iframe',['name'=>'searchbtn|搜索'])?>
                                <?= $this->render('/iframe',['name'=>'resetbtn|重置'])?>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="btn-group-sm" id="toolbar" role="group">
                <?= $this->render('/iframe',['name'=>'addbtn'])?>
                <?= $this->render('/iframe',['name'=>'editbtn'])?>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
</div>

<?php $this->beginBlock('script'); ?>
<script>
    getUserList();
    function getUserList() {
        var options = {
            modalName: "帮助",
            columns: [
                {checkbox: true},
                {field: 'id', title: 'ID', align: 'center', sortable: true,visible: false},
                {
                    field: 'title',
                    title: '标题',
                    formatter:function (value, row, index) {
                        return $.table.tooltip(value,20);
                    }
                },
                {
                    title: '状态',
                    field: 'status',
                    align: 'center',
                    formatter: function (value, row, index) {
                        return $.view.statusTools(row,true);
                    }
                },
                {field: 'create_time', title: '创建时间', align: 'center', sortable: true,visible: false},
                {field: 'create_user', title: '创建人', align: 'center', sortable: true,visible: false},
                {field: 'update_time', title: '更新时间', align: 'center', sortable: true},
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        return '<?=$this->render("/iframe",["name"=>"formopbtn","extend"=>["type"=>["edit","delete"],"rowId"=>"row.id"]])?>';
                    }
                }
            ]
        };
        $.table.init(options);
    }
</script>
<?php $this->endBlock(); ?>

